| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkTasks::LambdaTask Class Reference

Utility task using lambda functions to submit work. More...

Inheritance diagram for nkTasks::LambdaTask:

## Public Member Functions
| LambdaTask () noexcept
| LambdaTask (std::function< void()> asyncWorkFunction) noexcept
virtual | ~LambdaTask ()
void | setAsyncWorkFunction (std::function< void()> function)
virtual void | onAsyncWork () override
Public Member Functions inherited from nkTasks::Task
| Task () noexcept
virtual | ~Task ()

## Detailed Description

Utility task using lambda functions to submit work.

## Constructor & Destructor Documentation

## ◆ LambdaTask() [1/2]

nkTasks::LambdaTask::LambdaTask | ( |  | ) |
| noexcept

Default constructor.

## ◆ LambdaTask() [2/2]

nkTasks::LambdaTask::LambdaTask | ( | std::function< void()> | asyncWorkFunction | ) |
| noexcept

Callback constructor.

Parameters

  asyncWorkFunction | The callback to call during work.

## ◆ ~LambdaTask()

virtual nkTasks::LambdaTask::~LambdaTask | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ setAsyncWorkFunction()

void nkTasks::LambdaTask::setAsyncWorkFunction | ( | std::function< void()> | function | ) |

Sets the callback method to be called during the task work.

Parameters

  function | The function to call.

## ◆ onAsyncWork()

virtual void nkTasks::LambdaTask::onAsyncWork | ( |  | ) |
| override virtual

Callback for the work that the task needs to do. This will be called in the thread the task has been assigned to.

Implements nkTasks::Task.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsTasks/Tasks/LambdaTask.h